<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'index.jsp' starting page</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="style.css">
	
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/index.js"></script>
  </head>
  
  <body>
  <div id = "main">
 
	<div id = "left">
		<h1>新闻发布页面</h1> 
		<hr>
		<ul id = "list">
			<li><a href="index.jsp">发布新闻页</a></li>
			<li><a href="listNews.jsp">新闻列表页</a></li>
		</ul>
	</div>
	<div id = "right">
		<form action="pubNewsAction.do" method="post" enctype="multipart/form-data" >
			
			文章标题<input type="text" id="title" name="news.title"><br>
	
			文章作者<input type="text" id="author" name="news.author">
			发布时间<input type="text" id="datetime" name="news.date">
			<textarea rows="4" cols="60" name="news.content" enctype="multipart/form-data" ></textarea>
			<input type="submit" value="发布" onclick="return check()"><br>
	</form>
	</div>
</div>
<script type="text/javascript">
	window.onload=function(){
	var oFCKeditor = new FCKeditor('news.content') ;
	oFCKeditor.BasePath = "fckeditor/";
	oFCKeditor.ReplaceTextarea();
	}
</script>
	<!--检查必填选项是不是为空，并设置默认值  -->
<script type="text/javascript">
	//检查必填选项是不是为空，并设置默认值
	$(document).ready(function(){
	setValue();
	});
</script>

</body>
</html>
